home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270cp.lha / gnu / lib / g++-include / projectn.h < prev    next >
C/C++ Source or Header  |  1995-07-28  |  898b  |  34 lines

  1. /*
  2.  *
  3.  * Copyright (c) 1994
  4.  * Hewlett-Packard Company
  5.  *
  6.  * Permission to use, copy, modify, distribute and sell this software
  7.  * and its documentation for any purpose is hereby granted without fee,
  8.  * provided that the above copyright notice appear in all copies and
  9.  * that both that copyright notice and this permission notice appear
  10.  * in supporting documentation.  Hewlett-Packard Company makes no
  11.  * representations about the suitability of this software for any
  12.  * purpose.  It is provided "as is" without express or implied warranty.
  13.  *
  14.  */
  15.  
  16. #ifndef PROJECTN_H
  17. #define PROJECTN_H
  18.  
  19. #include <function.h>
  20.  
  21. template <class T, class U>
  22. struct select1st : public unary_function<T, U> {
  23.     const U& operator()(const T& x) const { return x.first; }
  24. };
  25.  
  26. template <class T, class U>
  27. struct ident : public unary_function<T, U> {
  28.     const U& operator()(const T& x) const { return x; }
  29. };
  30.  
  31. #endif
  32.  
  33.  
  34.